//
//  Worker.h
//  WSPluginSwitcher
//
//  Created by Marc Bauer on 18.01.09.
//  Copyright 2009 nesiumdotcom. All rights reserved.
//

#import <Cocoa/Cocoa.h>

#define kConnectionName @"de.websector.tools.WSPluginSwitcher"
#define kPlugInSwitchRight "de.websector.tools.WSPlugInSwitcher.switchPlugIn"

@protocol WorkerDelegate;

@interface Worker : NSObject
{
	NSObject <WorkerDelegate> *m_delegate;
	NSMutableArray *m_queue;
}
@property (nonatomic, assign) NSObject <WorkerDelegate> *delegate;

- (void)awake;
- (oneway void)addPathToQueue:(in bycopy NSString *)sourcePath 
	targetPath:(in bycopy NSString *)targetPath;
- (oneway void)startCopying;
@end


@protocol WorkerDelegate
- (oneway void)workerDidAwake:(in byref Worker *)worker;
- (oneway void)worker:(in byref Worker *)worker didCopyFile:(in bycopy NSString *)sourceFile;
- (oneway void)worker:(in byref Worker *)worker didFailWithError:(NSError *)error;
- (oneway void)workerDidCompleteCopying:(in byref Worker *)worker;
@end

@protocol WorkerInterface
- (oneway void)addPathToQueue:(in bycopy NSString *)sourcePath 
	targetPath:(in bycopy NSString *)targetPath;
- (oneway void)startCopying;
@end